<form id="pagerForm" method="post" action="">
	<input type="hidden" name="pageNum" value="{$pageNum}" />
	<input type="hidden" name="numPerPage" value="{$numPerPage}" />
	<input type="hidden" name="orderField" value="{$orderField}" />
	<input type="hidden" name="orderDirection" value="{$orderDirection}" />
	<input type="hidden" name="keywords" value="{$keywords}" />
	<input type="hidden" name="sfield" value="{$sfield}" />
	<input type="hidden" name="platform" value="{$platform}" />
</form>

<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="" method="post">
		<input type="hidden" name="m" value="{$module_name}" />
		<input type="hidden" name="a" value="{$action_name}" />
	<div class="searchBar">
		<ul class="searchContent">
			<li style="width:170px;">
				<label style="width:50px;">关键字：</label>
				<input type="text" name="uname" value="{$uname}" style="width:80px;"/>
			</li>
			<li style="width:0px;">
			<input type="hidden" name="sfield_name" value="id,user_id,mobile,tel,realname,company" />
			</li>
			<li style="width:60px;">
                <select name="sfield" class="combox"> 
                  <option value="all" {if $wherefields=='all'}selected="selected"{/if}>全部</option>
					<option value="userid" {if $wherefields=='userid'}selected="selected"{/if}>用户id</option>
					<option value="username" {if $wherefields=='username'}selected="selected"{/if}>用户帐号</option>
					<option value="agent_id" {if $wherefields=='agent_id'}selected="selected"{/if}>专营商id</option>
                </select>
            </li>
           <!-- <li style="width:380px;">
                <label style="width:60px;">会员区域：</label>
                <select name="vesting_province"   ref="city_money" refUrl="{:U('Areauser/area')}&id={value}&level=2" class="combox">
                    <option value="all">请选择省份...</option>
                    <volist name="Area_list" id="vo">
                        {if $vo['parentid'] == 0}
                        <option value="{$vo['id']}" {if $vesting_province==$vo['id']}selected="selected"{/if}>{$vo['name']}</option>
                        {/if}
                    </volist>
                  </select>
                  <select name="vesting_city" ref="city_money" refUrl="{:U('Areauser/area')}&id={value}&level=3" id="city_money" class="combox">
                    <option value="all">请选择城市...</option>
                    {if !empty($vesting_city)}
                    <volist name="Area_list" id="vo">
                        {if $vo['parentid'] == $vesting_province}
                        <option value="{$vo['id']}" {if $vesting_city==$vo['id']}selected="selected"{/if}>{$vo['name']}</option>
                        {/if}
                    </volist>
                    {/if}
                  </select>
                  <select name="vesting_area" id="city_money" class="combox">
                    <option value="all">请选择区域...</option>
                    {if !empty($vesting_area)}
                    <volist name="Area_list" id="vo">
                        {if $vo['parentid'] == $vesting_city}
                        <option value="{$vo['id']}" {if $vesting_area==$vo['id']}selected="selected"{/if}>{$vo['name']}</option>
                        {/if}
                    </volist>
                    {/if}
                  </select>
            </li>
			-->
			<li style="width:150px;">
			<label style="width:40px;">状态：</label>
			<select name="status" class="combox">
				<option value="all" {if $subject=='all'}selected="selected"{/if}>全部</option>
				<option value="0" {if $subject=='0'}selected="selected"{/if}>未审核</option>
				<option value="1" {if $subject=='1'}selected="selected"{/if}>已确认</option>
				<option value="3" {if $subject=='3'}selected="selected"{/if}>备货中</option>
				<option value="5" {if $subject=='5'}selected="selected"{/if}>已发货</option>
				<option value="8" {if $subject=='8'}selected="selected"{/if}>已签收</option>
				<option value="10" {if $subject=='10'}selected="selected"{/if}>已完成</option>
			</select>
			</li>
			
			<li style="width:180px;">
                <label style="width:60px;">开始时间：</label>
				<input name="ktime" style="width:80px;" class="date" type="text" value="<php>if(!empty($datetime)&&$datetime>0){</php>{$datetime|date='Y-m-d',###}<php>}</php>"/>
			</li>
			<li style="width:180px;">
			    <label style="width:60px;">结束时间：</label>
				<input name="jtime" style="width:80px;" class="date" type="text" value="<php>if(!empty($endtime)&&$endtime>0){</php>{$endtime|date='Y-m-d',###}<php>}</php>"/>
            </li>
			<div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div>
		</ul>
	</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<!--<php>
				$param=array();
				if($pid){
				}
			</php>-->
			<!--<li><a class="add" href="{:U('User/add',$param)}" target="dialog" width="580" height="350" rel="User_add"><span>添加用户</span></a></li>
			<li><a class="edit" href="{:U('Agent/edit')}&id={sid_dv}" target="dialog" width="580" height="350" warn="请选择一条信息"><span>修改信息</span></a></li>
			<li><a class="icon" width="830" height="380" href="{:U('Agent/detail')}&id={sid_dv}" target="dialog" warn="请选择一条信息"><span>查看信息</span></a></li>-->
			<li><a class="icon" href="{:U('Areauser/update_real_pay')}" target="ajaxTodo" warn="请选择一条信息"><span>一键全部更新</span></a></li>
			<li><a class="icon" href="{:U('Areauser/update_real_pay',array('day'=>60))}" target="ajaxTodo" warn="请选择一条信息"><span>一键更新(2月)</span></a></li>
			<li><a class="icon" href="{:U('Areauser/update_real_pay',array('day'=>30))}" target="ajaxTodo" warn="请选择一条信息"><span>一键更新(1月)</span></a></li>
			<li><a class="icon" href="{:U('Areauser/update_real_pay',array('day'=>7))}" target="ajaxTodo" warn="请选择一条信息"><span>一键更新(7天)</span></a></li>
			<li><a class="icon" href="{:U('Areauser/update_real_pay',array('day'=>1))}" target="ajaxTodo" warn="请选择一条信息"><span>一键更新(1天)</span></a></li>
			<!--<li><a class="icon" href="javascript:$.printBox('user_list')"><span>打印</span></a></li>-->
		</ul>
	</div>
	<div id="user_list">
	<table class="table" layoutH="110" width="100%">
		<thead>
			<tr>
				 <th>用户id</th>
				  <th>用户帐号</th>
				  <th>专营商ID</th>
				  <th>订单编号</th>
				  <th>订单总额</th>
				  <th>商品类型</th>
				  <th>实际支付</th>
				  <th>分成比例</th>
				  <th>毛利润</th>
				   <th>状态</th>
				  <th>下单时间</th>
				
				<!--<th width="110" orderField="endtime" {if $orderField=='endtime'}class="{$orderDirection}"{/if}>合约结束</th>-->
				<!--<th width="120">编辑</th>-->
			</tr>
		</thead>
		<tbody>
		<volist name="list" id="data">
			  <tr>
				<td><a title="查看" target="dialog" style="color:blue;" width="630" height="590" rel="User_detail_{$data['id']}" href="{:U('User/detail',array('id'=>$data['id']))}">{$data[id]}</a></td>
				<td>{$data[username]}</td>
				<td><a title="查看" target="dialog" style="color:blue;" width="630" height="590" rel="User_detail_{$data['agent_id']}" href="{:U('User/detail',array('id'=>$data['agent_id']))}">{$data[agent_id]}</a></td>
				<td><a title="查看" target="dialog" style="color:blue;" width="830" height="680" rel="Order_detail_{$data['sn']}" href="{:U('Order/detail',array('id'=>$data['oid']))}">{$data['sn']}</a></td>
				<td>{$data[amount]/100}</td>
				<td>{$pro_type[$data[mname]]}</td>
				<td>{$data[value]/100}</td>
				<td>{$data[profit]}</td>
				<td>{$data[profit_total]}</td>
				<td>
					{if $data[status] == 0} 未审核 {elseif $data[status] == 1} 已确认{elseif $data[status] == 3}备货中{elseif $data[status] == 5}已发货{elseif $data[status] == 8}已签收{elseif $data[status] == 10}已经完成 {/if}
					{if $data[pay_status] == 0}未支付{elseif $data[pay_status] == 1}支付中 {elseif $data[pay_status] == 2}已支付{/if}|
					{if $data[shipping_status] == 0}未发货{elseif $data[shipping_status] == 1}已出库{elseif $data[shipping_status] == 2}已收货{elseif $data[shipping_status] == 3}申请换货{elseif $data[shipping_status] == 4} 已换货{/if}
				</td>
				<td>
					{$data[add_time]|date='Y-m-d h:i:s',###}
				</td>
			  </tr>
				<!--td><a title="编辑" target="dialog" width="580" height="350"  rel="Agent_edit_{$vo['id']}" href="{:U('Agent/edit',array('id'=>$vo['id']))}" class="btnEdit">编辑</a><a title="查看" target="dialog" width="830" height="380" rel="Agent_detail_{$vo['id']}" href="{:U('Agent/detail',array('id'=>$vo['id']))}" class="btnInfo">查看</a></td>-->
			</tr>
		</volist>
		</tbody>
	</table>
	</div>
	<div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
				<option value="20" {if $numPerPage==20}selected="selected"{/if}>20</option>
				<option value="50" {if $numPerPage==50}selected="selected"{/if}>50</option>
				<option value="66" {if $numPerPage==66}selected="selected"{/if}>66</option>
				<option value="100" {if $numPerPage==100}selected="selected"{/if}>100</option>
				<option value="200" {if $numPerPage==200}selected="selected"{/if}>200</option>
			</select>
			<span>条，共{$totalCount}条</span>
		</div>
		
		<div class="pagination" targetType="navTab" totalCount="{$totalCount}" numPerPage="{$numPerPage}" pageNumShown="10" currentPage="{$pageNum}"></div>
	</div>
</div>
